package com.modlin.selenium;

import org.testng.*;
import org.testng.annotations.*;
import org.openqa.selenium.*;

/**
 * @author v.berdutin
 * 
 */

public class AddTeacher extends com.modlin.selenium.pages.TestBase {

	@Test(description = "-create new teacher for US school")
	public void CreateTeacher() throws Exception {
		enterLoginForm("principal@us.us", "12345678");
		Assert.assertEquals(driver.findElement(By.xpath("//div/div[2]"))
				.getText(), "Jhon Smitt");
		clickSchoolsLink();
		clickAddTeacher();
		Assert.assertTrue(driver.findElement(By.cssSelector("h4")).isDisplayed());
		enterTeacherFirstName("vbe");
		enterTeacherLastName("testt");
		enterTeacherPass("12345678");
		confirmTeacherPass("12345678");
		clickActiveCheckbox();
		enterTeacherCity("City1");
		enterTeacherZip("zip11");
		enterTeacherAddress("adr111");
		enterTeacherPhone("phone1");
		enterTeacherEmail(x + "@gmail.com");
		clickSaveButton();
		Assert.assertTrue(driver.findElement(By.linkText("vbe testt")).isDisplayed());
	}

}